package org.ceteca.explica.core.installer;

import java.io.Serializable;

public class ResourceOT implements Serializable {
	private long idResource;
	private String codResource;
	private String description;
	private String path;
	private String idArea;
	private Integer version = new Integer(0);
	private static final long serialVersionUID = 10000003;
	
	public ResourceOT() {
	}

	public String getCodResource() {
		return codResource;
	}

	public void setCodResource(String codResource) {
		this.codResource = codResource;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public long getIdResource() {
		return idResource;
	}

	public void setIdResource(long idResource) {
		this.idResource = idResource;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}
	
	public String getIdArea() {
		return idArea;
	}

	public void setIdArea(String idArea) {
		this.idArea = idArea;
	}

	public boolean equals(Object other) {
        if (this == other) 
        	return true;
        if ( !(other instanceof ResourceOT) ) 
        	return false;

        final ResourceOT res = (ResourceOT) other;

        if ( res.getCodResource() == null )
        	return this.getCodResource() == null;
        else if ( !res.getCodResource().equals( this.getCodResource() ) ) 
        	return false;

        return true;
    }

    public int hashCode() {
    	int hash = 1;
        hash = hash * 31 + this.getCodResource().hashCode();
        hash = hash * 31 
                    + (this.getDescription() == null ? 0 : this.getDescription().hashCode());
        return hash;
    }

}
